a = [1,5,6]
b = a
b.append(9)
print(a is b )   # True
print(a)         # [1, 5, 6, 9]
print(id(a),id(b))


a = [1,2,3,4]
b = [1,2,3,4]
print(a == b)  # True
print(a is b)  # False

#注意这种小整数的指向有些特殊
a = 1
b = 1
print(a == b)  #True
print(a is b ) #True


a = object()
b = a
del a
print(b)
#print(a)


class A:
    def __del__(self):
        print("A 销毁")
a = A()
del  a



class Company:
    def __init__(self,name,staffs = [],address="南环路"):
        self.name = name
        self.staffs = staffs

    def add(self,staff):
        self.staffs.append(staff)
print("---------------------------------")

print(Company.__init__.__defaults__)
a = Company("A")
a.add("jack")
print(a.staffs)

b = Company("B")
b.add("rose")

print(a.staffs)
print(a.staffs is b.staffs)

print(Company.__init__.__defaults__)